<?php

/**
 * model_discipline
 */

	class Model_discipline extends YOU {

	public function __construct()
	{
		parent::__construct();
	}

	/** 读取成配置 **/
	public function getIni()
	{
		$discipline_lists = $this->getAll();
		foreach ($discipline_lists as $key => $value){
			$discipline[$value['discipline_id']] = $value['discipline_name'];
		}

		return $discipline;
	}

	/** 读取列表 **/
	public function getAll($field = "*")
	{
		$discipline_lists = $this->db->fetchAll("SELECT {$field} FROM `tbl_discipline` ");

		return $discipline_lists;
	}

	/** 读取信息 **/
	public function getInfo($discipline_id, $field = "*")
	{
		$data = $this->db->fetchRow("SELECT {$field} FROM `tbl_discipline` WHERE discipline_id='{$discipline_id}' ");

		return $data;
	}

}



?>